package com.eshop.utils;

import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;

public class CateDTO implements Serializable
{
    private static final long serialVersionUID = 1L;
    private Long id;
    private Long pid;
    private String cateName;
    private String pic;
    private List<CateDTO> children;
    
    public CateDTO() {
        this.children = new ArrayList<CateDTO>();
    }
    
    public Long getId() {
        return this.id;
    }
    
    public Long getPid() {
        return this.pid;
    }
    
    public String getCateName() {
        return this.cateName;
    }
    
    public String getPic() {
        return this.pic;
    }
    
    public List<CateDTO> getChildren() {
        return this.children;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setPid(final Long pid) {
        this.pid = pid;
    }
    
    public void setCateName(final String cateName) {
        this.cateName = cateName;
    }
    
    public void setPic(final String pic) {
        this.pic = pic;
    }
    
    public void setChildren(final List<CateDTO> children) {
        this.children = children;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof CateDTO)) {
            return false;
        }
        final CateDTO other = (CateDTO)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$pid = this.getPid();
        final Object other$pid = other.getPid();
        Label_0102: {
            if (this$pid == null) {
                if (other$pid == null) {
                    break Label_0102;
                }
            }
            else if (this$pid.equals(other$pid)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$cateName = this.getCateName();
        final Object other$cateName = other.getCateName();
        Label_0139: {
            if (this$cateName == null) {
                if (other$cateName == null) {
                    break Label_0139;
                }
            }
            else if (this$cateName.equals(other$cateName)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$pic = this.getPic();
        final Object other$pic = other.getPic();
        Label_0176: {
            if (this$pic == null) {
                if (other$pic == null) {
                    break Label_0176;
                }
            }
            else if (this$pic.equals(other$pic)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$children = this.getChildren();
        final Object other$children = other.getChildren();
        if (this$children == null) {
            if (other$children == null) {
                return true;
            }
        }
        else if (this$children.equals(other$children)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof CateDTO;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $pid = this.getPid();
        result = result * 59 + (($pid == null) ? 43 : $pid.hashCode());
        final Object $cateName = this.getCateName();
        result = result * 59 + (($cateName == null) ? 43 : $cateName.hashCode());
        final Object $pic = this.getPic();
        result = result * 59 + (($pic == null) ? 43 : $pic.hashCode());
        final Object $children = this.getChildren();
        result = result * 59 + (($children == null) ? 43 : $children.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "CateDTO(id=" + this.getId() + ", pid=" + this.getPid() + ", cateName=" + this.getCateName() + ", pic=" + this.getPic() + ", children=" + this.getChildren() + ")";
    }
}
